package cn.ms.doctor.Entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName doctor_patient
 */
@Data
public class Patient implements Serializable {
    /**
     * 病人id
     */
    private Integer patientId;

    /**
     * 病人名字
     */
    private String patientName;

    /**
     * 身份证
     */
    private String patientIdnum;

    /**
     * 性别
     */
    private String patientSex;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Patient other = (Patient) that;
        return (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getPatientName() == null ? other.getPatientName() == null : this.getPatientName().equals(other.getPatientName()))
            && (this.getPatientIdnum() == null ? other.getPatientIdnum() == null : this.getPatientIdnum().equals(other.getPatientIdnum()))
            && (this.getPatientSex() == null ? other.getPatientSex() == null : this.getPatientSex().equals(other.getPatientSex()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getPatientName() == null) ? 0 : getPatientName().hashCode());
        result = prime * result + ((getPatientIdnum() == null) ? 0 : getPatientIdnum().hashCode());
        result = prime * result + ((getPatientSex() == null) ? 0 : getPatientSex().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", patientId=").append(patientId);
        sb.append(", patientName=").append(patientName);
        sb.append(", patientIdnum=").append(patientIdnum);
        sb.append(", patientSex=").append(patientSex);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}